// import { add } from '~/add';
// const s:string='hello TypeScript !!!';

// console.log(s+add(3,3))
// document.querySelector('#app')!.innerHTML='hello DOM !!!';

// import { createApp, h } from "vue";
import App from "./App.vue";
import { createRouter, createWebHistory } from "vue-router";

// import { createPinia } from "pinia";
// const App={
//     //template:`<div>hello Vue !!!</div>`
//     return(){
//         // <div>Hello Vue</div>
//         return h('div',null,[
//             [String('Hello Vue')]
//         ])
//     }
// }
import "./css/main.css";
import "uno.css";
import "nprogress/nprogress.css"; //进度条样式必须引入
import { setupLayouts } from 'virtual:generated-layouts'
import generatedRoutes from 'virtual:generated-pages'
// import routes from "~pages"
const routes = setupLayouts(generatedRoutes)

const router = createRouter({
  history: createWebHistory(),
  // routes: [
  //   { path: "/", component: () => import("~/pages/index.vue") },
  //   { path: "/login", component: () => import("~/pages/login.vue") },
  // ],
  routes
});
const pinia = createPinia();
const app=createApp(App)  
app.use(router)
//.use(pinia)
//自动加载
Object.values(import.meta.globEager('./modules/*.ts')).forEach(i => i.install?.({app,router,isClient:true}))
app.mount("#app");
